<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/11/12
 * Time: 9:49
 */
namespace app\web\controller;

use app\web\model\Shangpin;
use app\web\util\PscwsUtil;
use app\common\util\JwtUtil;
use think\Facade\Db;
use think\facade\Cache;
use SplQueue;
use think\facade\Log;
//use think\facade\Session;

class Test extends Base{
    public function setSession(){
//        Session::set("test",['id'=>1,'token'=>'abcdefg']);
        session('test',['id'=>1,'token'=>'abcdefg111']);
    }

    public function getSession(){
//        $a = Session::get('test');
        $a = session('test');
        print_data($a);
    }
    public function index(){
        if ($this->request->ispost()) {
            $str = "1,2,3,4";
            $var=explode(",",$str);
            return count($var);
        }else{
            return "Get请求";
        }
    }
}
